<?php $this->load->view('partial/head'); ?>

<script>
$(function(){
	$('.dataTables').dataTable();
});
</script>

<h1><?=$title?></h1>

<?php if($pesan != NULL){
	echo "<div class='form-info ".($pesan['success'] ? 'success' : 'fail')."'>".$pesan['pesan']."</div>";
} ?>

<table class="dataTables" cellspacing="0" width="100%">
	<thead>
		<tr>
			<th width="5%">No.</th>
			<th>No. Meja</th>
			<th>Waktu Pesan</th>
			<th>Status</th>
			<th>Aksi</th>
		</tr>
	</thead>
	<tbody>
		<?php $no= 1; foreach($pesanan as $pesanan){ ?>
			<tr>
				<td><?=$no?></td>
				<td><?=$pesanan['no_meja']?></td>
				<td><?=$pesanan['waktu_pesan']?></td>
				<td><font color="<?=$status[$pesanan['status']]['warna']?>"><?=$status[$pesanan['status']]['nama']?></font></td>
				<td><a href="<?=base_url()."index.php/kasir/detail_pesanan/".$pesanan['id_pesanan']."/".$is_history?>">Detail Pesanan</a>
				</a></td>
			</tr>
		<?php $no++; } ?>
	</tbody>
</table>